<?php
/**
 *      [迷你云] (C)2009-2012 南京恒为网络科技.
 *   软件仅供研究与学习使用，如需商用，请访问www.miniyun.cn获得授权
 * 
 */
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="pragma" content="no-cache" />
<title><?php echo $this->cataName;?></title>
<link rel="shortcut icon" href="<?php echo(Yii::app()->params['app']['host'].Yii::app()->params['app']['logoSmall']);?>" />
<link href="<?php echo(Yii::app()->params['app']['host'])?>/statics/web/css/common.css?v=<?php echo(Yii::app()->params['app']['version'])?>" rel="stylesheet" type="text/css" />
<link href="<?php echo(Yii::app()->params['app']['host'])?>/statics/web/css/page.css?v=<?php echo(Yii::app()->params['app']['version'])?>" rel="stylesheet" type="text/css" />
<script type="text/javascript">document.domain=window.location.host;</script>
<script type="text/javascript" src="<?php echo(Yii::app()->params['app']['host'])?>/statics/web/js/jquery.js?v=<?php echo(Yii::app()->params['app']['version'])?>"></script>
<script type="text/javascript" src="<?php echo(Yii::app()->params['app']['host'])?>/statics/web/js/util.js?v=<?php echo(Yii::app()->params['app']['version'])?>"></script>
</head>

<body>

<?php echo $content; ?>

</body>
</html>

<script type="text/javascript">
	var IsTempLoad = true;
	var dataSource = {aid: <?php echo $this->aid;?>, cid: 0};
	var NoRightSide = false;
    var downURI = "<?php echo(Yii::app()->params['app']['host'])?>";
    var SideFreeTips;
    switch(Number(dataSource.aid)){
        case 30:
            SideFreeTips = '<div class="file-info">'+
                        '<div class="file-thumb folder-shared"></div>'+
                        '<div class="thumb-name">我的分享</div>' +
                        '</div>' +
                        '<div class="sub-tips">' +
                        '<h3><i class="icon ico-tips"></i>小贴士</h3>' +
                        '<ul>' +
                            '<li>• 本区记录您最近的分享列表 </li>' +
                        '</ul>' +
                        '</div>'
            break;
        case 31:
            SideFreeTips = '<div class="file-info">'+
                        '<div class="file-thumb folder-favorite"></div>'+
                        '<div class="thumb-name">我的最爱</div>' +
                        '</div>' +
                        '<div class="sub-tips">' +
                        '<h3><i class="icon ico-tips"></i>小贴士</h3>' +
                        '<ul>' +
                            '<li>• 标记"最爱"，把资源列入重点关注对象</li>' +
                        '</ul>' +
                    '</div>'
            break;
        case 32:
            SideFreeTips = '<div class="file-info">'+
                        '<div class="file-thumb folder-recent"></div>'+
                        '<div class="thumb-name">最近上传</div>' +
                        '</div>' +
                        '<div class="sub-tips">' +
                        '<h3><i class="icon ico-tips"></i>小贴士</h3>' +
                        '<ul>' +
                            '<li>• 本区记录最近上传的文件列表 </li>' +
                        '</ul>' +
                    '</div>';
            break;
        case 33:
            SideFreeTips = '<div class="file-info">'+
                        '<div class="file-thumb folder-continue"></div>'+
                        '<div class="thumb-name">待续传文件</div>' +
                        '</div>' +
                        '<div class="sub-tips">' +
                        '<h3><i class="icon ico-tips"></i>小贴士</h3>' +
                        '<ul>' +
                            '<li>• 记录您最近未传完的列表 </li>' +
                            '<li>• 使用高速上传控件，可随时暂停和继续上传 </li>' +
                        '</ul>' +
                    '</div>';
            break;
        case 34:
            SideFreeTips = '<div class="file-info">'+
                            '<div class="file-thumb folder-history"></div>'+
                            '<div class="thumb-name">最近浏览</div>' +
                        '</div>'+
                        '<div class="sub-tips">' +
                        '<h3><i class="icon ico-tips"></i>小贴士</h3>' +
                        '<ul>' +
                            '<li>• 本区记录最近浏览的文档，帮助您整理重点关注的文档 </li>' +
                            ('0' == "0"? "" : '<li>• 普通会员默认显示0条最近浏览历史</li>') +
                        '</ul>' +
                    '</div>'
            break;
    }
	var interface = {
		GetHtml: function(arr){
			return "";
		},
        Privacy: function(setting, item){
            if(setting.answer){
                item.attr("has_pass","1");
                item.attr("file_pwd", setting.answer);
                item.find("[field='ext3']").val(setting.question);
                if(!item.find("[rel='has_pass']").length){
                    var html = '<i class="lock-small" rel="has_pass" title="已加密"></i>';
                    item.find(".file-name").append(html);
                }
                window["interface"].Share(item);
            }
            else{
                item.attr("has_pass", "");
                item.removeAttr("file_pwd");
                item.find("[field='ext3']").val("");
                item.find("[rel='has_pass']").empty().remove();
            }
        },
        AllowCollect: function(is_collect, item){
            item.attr("is_collect", is_collect);
        },
        Share: function(item){
            item.removeAttr("load_data");
            item.attr("is_share", "1");
            item.find(".file-type").html('<b class="shared"></b>');
            if(item.attr("file_type") == "0"){
                item.removeAttr("load_data");
            }
        },
        CancelShare: function(item){
            item.attr("is_share", "0");
            item.find(".file-type").html('');
            if(item.attr("file_type") == "0"){
                item.find(".file-state").html('');
            }
            window["interface"].Privacy({answer: ""}, item);
        },
        Copy:function(ele){
            var line = $(ele).parents('[rel="item"]');
            var url = downURI + ((line.attr("file_type") == "1")? "/file/" : "/folder/" ) + line.attr("pick_code");
            Util.Copy(url);
        }
	}
</script>
<script type="text/javascript" src="<?php echo(Yii::app()->params['app']['host'])?>/statics/web/js/list.js?v=<?php echo(Yii::app()->params['app']['version'])?>"></script>
<script type="text/javascript">
//选中文件委托
FileCheckHandler = function(arr, eX, eY){
	TopMenu.CheckMenu(arr, eX, eY);
}

//右键
FileRightHandler = function(arr, eX, eY){
    if(parent){
        parent.window.Main.Core.FileMenu.FileRight(dataSource.aid, dataSource.cid,arr, eX, eY);
    }
    TopMenu.HideMenu();
}

window.setTimeout(function(){
    try{
        parent.window.TreeCTL.HideFrameBtn = TopMenu.HideMenu;
    }catch(e){}
},10);
    
FileCheckHandler(false);
</script>